CC=g++
CFLAGS= -Wall -std=c++0x -c -O2

all: joosc

joosc: main_submitting.o Lexer.o DFA.o Parser.o ParseNodes.o ParseBaseNodes.o Compilation.o Converts.o NodeVisitor.o CompressionVisitor.o FillVisitor.o WeedingVisitor.o EnvironmentBuildingVisitor.o TypeLinkingVisitor.o HierarchyCheckingVisitor.o DisambiguateVisitor.o TypeCheckDispatcher.o TypeCheckVisitor.o ReachabilityVisitor.o IndexVisitor.o CodeGeneratingVisitor.o PrintVisitor.o
	$(CC) main_submitting.o Lexer.o DFA.o Parser.o ParseNodes.o ParseBaseNodes.o Compilation.o Converts.o NodeVisitor.o CompressionVisitor.o FillVisitor.o WeedingVisitor.o EnvironmentBuildingVisitor.o TypeLinkingVisitor.o HierarchyCheckingVisitor.o DisambiguateVisitor.o TypeCheckDispatcher.o TypeCheckVisitor.o ReachabilityVisitor.o PrintVisitor.o IndexVisitor.o CodeGeneratingVisitor.o -o joosc

PrintVisitor.o: PrintVisitor.cpp
	$(CC) $(CFLAGS) PrintVisitor.cpp	
	
CodeGeneratingVisitor.o: CodeGeneratingVisitor.cpp
	$(CC) $(CFLAGS) CodeGeneratingVisitor.cpp
	
IndexVisitor.o: IndexVisitor.cpp
	$(CC) $(CFLAGS) IndexVisitor.cpp	
	
ReachabilityVisitor.o: ReachabilityVisitor.cpp
	$(CC) $(CFLAGS) ReachabilityVisitor.cpp

ConstExpressionVisitor.o: ConstExpressionVisitor.cpp
	$(CC) $(CFLAGS) ConstExpressionVisitor.cpp
	
TypeCheckingVisitor.o: TypeCheckVisitor.cpp
	$(CC) $(CFLAGS) TypeCheckVisitor.cpp	
	
TypeCheckDispatcher.o: TypeCheckDispatcher.cpp
	$(CC) $(CFLAGS) TypeCheckDispatcher.cpp
	
DisambiguateVisitor.o: DisambiguateVisitor.cpp
	$(CC) $(CFLAGS) DisambiguateVisitor.cpp	
	
HierarchyCheckingVisitor.o: HierarchyCheckingVisitor.cpp
	$(CC) $(CFLAGS) HierarchyCheckingVisitor.cpp	
	
TypeLinkingVisitor.o: TypeLinkingVisitor.cpp
	$(CC) $(CFLAGS) TypeLinkingVisitor.cpp
	
EnvironmentBuildingVisitor.o: EnvironmentBuildingVisitor.cpp
	$(CC) $(CFLAGS) EnvironmentBuildingVisitor.cpp	
	
WeedingVisitor.o: WeedingVisitor.cpp
	$(CC) $(CFLAGS) WeedingVisitor.cpp	
	
FillVisitor.o: FillVisitor.cpp
	$(CC) $(CFLAGS) FillVisitor.cpp	
	
CompressionVisitor.o: CompressionVisitor.cpp
	$(CC) $(CFLAGS) CompressionVisitor.cpp	
	
NodeVisitor.o: NodeVisitor.cpp
	$(CC) $(CFLAGS) NodeVisitor.cpp
	
Converts.o: Converts.cpp
	$(CC) $(CFLAGS) Converts.cpp	
	
Compilation.o: Compilation.cpp
	$(CC) $(CFLAGS) Compilation.cpp	
	
ParseBaseNodes.o: ParseBaseNodes.cpp
	$(CC) $(CFLAGS) ParseBaseNodes.cpp	
	
ParseNodes.o: ParseNodes.cpp
	$(CC) $(CFLAGS) ParseNodes.cpp		
	
Parser.o: Parser.cpp
	$(CC) $(CFLAGS) Parser.cpp
	
Lexer.o: Lexer.cpp
	$(CC) $(CFLAGS) Lexer.cpp

DFA.o: DFA.cpp
	$(CC) $(CFLAGS) DFA.cpp

clean:
	rm -rf *o joosc